package com.ehi.alliance.service;

import com.ehi.alliance.dao.AllianceDao;
import com.ehi.common.domain.alliance.AllianceInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AllianceService {

    @Autowired
    private AllianceDao allianceDao;

    @Cacheable(value = "mc.alliance.AllianceService.getByAllianceId#1800", key = "#allianceId")
    @Transactional(readOnly = true)
    public AllianceInfo getByAllianceId(String allianceId) {
        return allianceDao.getByAllianceId(allianceId);
    }
}
